/*
 * File:   TrieTest.cpp
 * Author: luis
 *
 * Created on 24-07-2013, 11:50:56 AM
 */

#include "trietest.h"
#include "structures/trie.h"


CPPUNIT_TEST_SUITE_REGISTRATION(TrieTest);

TrieTest::TrieTest()
{
}

TrieTest::~TrieTest()
{
}

void TrieTest::setUp()
{
}

void TrieTest::tearDown()
{
}

void TrieTest::testAddWord()
{
    Trie* trie = new Trie();
    trie->addWord("Sample");
    trie->addWord("Alo");
    trie->addWord("Alo ja");
    CPPUNIT_ASSERT(trie->searchWord("Sample"));
    CPPUNIT_ASSERT(trie->searchWord("Alo"));
    CPPUNIT_ASSERT(trie->searchWord("Alo ja"));
}

